<template>
  <div>
    <div>
      <div id="contentDIV">

        <div id='contentBox'>
          <div class='leftBox'>
            <div class='upBox'>
              <a-card title="上行">
                <a-button slot="extra" type='primary'>设置</a-button>
                <a-form-model :model="formUp" :label-col="labelCol" :wrapper-col="wrapperCol">
                  <a-form-model-item label="状态">
                    <a-select v-model="formUp.status" placeholder="">
                      <a-select-option value="0">
                        复位状态
                      </a-select-option>
                      <a-select-option value="1">
                        工作状态
                      </a-select-option>
                    </a-select>
                  </a-form-model-item>
                  <a-form-model-item label="配置模式">
                    <a-select v-model="formUp.configurationMode" placeholder="">
                      <a-select-option value="DBPSK">
                        DBPSK
                      </a-select-option>
                      <a-select-option value="DQPSK">
                        DQPSK
                      </a-select-option>
                    </a-select>
                  </a-form-model-item>

                </a-form-model>
              </a-card>
            </div>
            <div class='downBox'>
              <a-card title="下行">
                <a-button slot="extra" type='primary'>设置</a-button>
                <a-form-model :model="formDown" :label-col="labelCol" :wrapper-col="wrapperCol">
                  <a-form-model-item label="状态">
                    <a-select v-model="formDown.status" placeholder="">
                      <a-select-option value="0">
                        复位状态
                      </a-select-option>
                      <a-select-option value="1">
                        工作状态
                      </a-select-option>
                    </a-select>
                  </a-form-model-item>
                  <a-form-model-item label="配置模式">
                    <a-select v-model="formDown.configurationMode" placeholder="">
                      <a-select-option value="DBPSK">
                        DBPSK
                      </a-select-option>
                      <a-select-option value="DQPSK">
                        DQPSK
                      </a-select-option>
                    </a-select>
                  </a-form-model-item>

                </a-form-model>
              </a-card>

            </div>
            <div class='publicConfigurationBox'>
              <a-card title="公共配置">
                <a-button slot="extra" type='primary'>设置</a-button>
                <a-form-model :model="formPublicConfiguration" :label-col="labelCol" :wrapper-col="wrapperCol">
                  <a-form-model-item label="始终选择">
                    <a-select v-model="formPublicConfiguration.status" placeholder="">
                      <a-select-option value="0">
                        内时钟
                      </a-select-option>
                      <a-select-option value="1">
                        外时钟
                      </a-select-option>
                    </a-select>
                  </a-form-model-item>


                </a-form-model>
              </a-card>
            </div>

          </div>
          <div class='frequencyHoppingBox'>
            <a-card title="跳频">
              <a-button slot="extra" type='primary'>设置</a-button>
              <a-form-model :model="formFrequencyHopping" :label-col="labelCol1" :wrapper-col="wrapperCol1">
                <a-row>
                  <a-col :span=12>
                    <a-form-model-item label="下行工作状态">
                      <a-select v-model="formFrequencyHopping.downwardResetSignal" placeholder="">
                        <a-select-option value="0">
                          复位状态
                        </a-select-option>
                        <a-select-option value="1">
                          正常状态
                        </a-select-option>
                      </a-select>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span=12>
                    <a-form-model-item label="上行工作状态">
                      <a-select v-model="formFrequencyHopping.upwardResetSignal" placeholder="">
                        <a-select-option value="0">
                          复位状态
                        </a-select-option>
                        <a-select-option value="1">
                          正常状态
                        </a-select-option>
                      </a-select>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span=12>
                    <a-form-model-item label="下行频率模式">
                      <a-select v-model="formFrequencyHopping.downlinkSwitching" placeholder="">
                        <a-select-option value="0">
                          定频模式
                        </a-select-option>
                        <a-select-option value="1">
                          跳频模式
                        </a-select-option>
                      </a-select>
                    </a-form-model-item>

                  </a-col>
                  <a-col :span=12>
                    <a-form-model-item label="上行频率模式">
                      <a-select v-model="formFrequencyHopping.uplinkSwitching" placeholder="">
                        <a-select-option value="0">
                          定频模式
                        </a-select-option>
                        <a-select-option value="1">
                          跳频模式
                        </a-select-option>
                      </a-select>
                    </a-form-model-item>

                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span=12>

                    <a-form-model-item label="下行定频频率值">
                      <a-input-number style="width:100%"
                        v-model="formFrequencyHopping.downFrequencyValue"></a-input-number>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span=12>

                    <a-form-model-item label="上行定频频率值">
                      <a-input-number style="width:100%"
                        v-model="formFrequencyHopping.upFrequencyValue"></a-input-number>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>

                  <!-- <a-col :span=12>
                        <a-form-model-item label="调频模式下同步信道频率">
                            <a-input-number  style="width:100%"  v-model="formFrequencyHopping.upFrequencSynchronousChannelFrequencyyValue"></a-input-number>
                          </a-form-model-item>
                    </a-col> -->
                </a-row>
                <a-row>
                  <a-col :span=12>
                    <a-form-model-item label="跳频模式下同步信道频率">
                      <a-input-number style="width:100%"
                        v-model="formFrequencyHopping.upFrequencSynchronousChannelFrequencyyValue"></a-input-number>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span=12>
                    <a-form-model-item label="上行同步脉冲输入选择">
                      <a-select @change='changeIntermediateFrequency'
                        v-model="formFrequencyHopping.ReferenceUplinkSynchronousPulseInput" placeholder="">
                        <a-select-option value="0">
                          下行同步脉冲
                        </a-select-option>
                        <a-select-option value="1">
                          自建
                        </a-select-option>
                      </a-select>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span=12>

                    <a-form-model-item label="单向星地传输延迟接口">
                      <a-input-number style="width:100%" v-model="formFrequencyHopping.DelayInterface"></a-input-number>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span=12>

                    <a-form-model-item label="下行频率切换时刻">
                      <a-input-number style="width:100%"
                        v-model="formFrequencyHopping.DownwardSwitchingTime"></a-input-number>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span=12>

                    <a-form-model-item label="上行频率切换时刻">
                      <a-input-number style="width:100%"
                        v-model="formFrequencyHopping.UpwardSwitchingTime"></a-input-number>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span=12>

                    <a-form-model-item label="上下行脉冲调整时间">
                      <!-- <a-form-model-item label="上行同步脉冲相对下行同步脉冲的调整时间"> -->
                      <a-input-number style="width:100%"
                        v-model="formFrequencyHopping.RelativeAdjustmentTime"></a-input-number>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span=12>

                    <a-form-model-item label="上行跳频频偏补偿">
                      <a-input-number style="width:100%"
                        v-model="formFrequencyHopping.FrequencyOffsetCompensation"></a-input-number>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span=12>
                    <a-form-model-item label="中频切换">
                      <a-select @change='changeIntermediateFrequency'
                        v-model="formFrequencyHopping.IntermediateFrequencySwitching" placeholder="">
                        <a-select-option value="960">
                          960MHz
                        </a-select-option>
                        <a-select-option value="1200">
                          1200MHz
                        </a-select-option>
                      </a-select>
                    </a-form-model-item>
                  </a-col>
                </a-row>

              </a-form-model>
            </a-card>
          </div>
        </div>
        <div class='statusDisplayBox'>
          <a-card title="状态显示">
            <!-- <a-button slot="extra" type='primary'>设置</a-button> -->
            <a-form-model :model="formStatusDisplay" :label-col="labelCol1" :wrapper-col="wrapperCol1">
              <a-row>
                <a-col :span='6'>
                  <a-form-model-item label="下行锁定跟踪状态">
                    <a-input v-model="formStatusDisplay.trackStatus"></a-input>
                  </a-form-model-item>
                </a-col>
                <a-col :span='6'>
                  <a-form-model-item label="下行载频偏差估计值">
                    <a-input v-model="formStatusDisplay.EstimatedFrequencyDeviationValue"></a-input>
                  </a-form-model-item>
                </a-col>
                <a-col :span='6'>
                  <a-form-model-item label="下行信道信号噪声估计值">
                    <a-input v-model="formStatusDisplay.NoiseEstimationValue"></a-input>
                  </a-form-model-item>
                </a-col>
                <a-col :span='6'>
                  <a-form-model-item label="下行信道信号功率估计值">
                    <a-input v-model="formStatusDisplay.PowerEstimationValue"></a-input>
                  </a-form-model-item>
                </a-col>
                <a-col :span='6'>
                  <a-form-model-item label="ADRV9002接收信号强度指示">
                    <a-input v-model="formStatusDisplay.StrengthIndicator"></a-input>
                  </a-form-model-item>
                </a-col>
                <a-col :span='6'>
                  <a-form-model-item label="ADRV9002过载指示">
                    <a-input v-model="formStatusDisplay.OverloadIndication"></a-input>
                  </a-form-model-item>
                </a-col>
                <a-col :span='6'>
                  <a-form-model-item label="片内温度">
                    <a-input v-model='formStatusDisplay.Temperature' />
                  </a-form-model-item></a-col>
                <a-col :span='6'>
                  <a-form-model-item label="片内电压">
                    <a-input v-model='formStatusDisplay.voltage' />
                  </a-form-model-item></a-col>
              </a-row>


            </a-form-model>
          </a-card>
        </div>
      </div>



    </div>

  </div>

</template>

<script>

import { JeecgListMixin } from '@/mixins/JeecgListMixin/'
import { getAction } from '@/api/manage.js'
export default {
  name: 'BasebandControl',
  // mixins: [JeecgListMixin],
  data() {
    return {
      formUp: {},
      formDown: {},
      formPublicConfiguration: {},
      formFrequencyHopping: {},
      formStatusDisplay: {},
      labelCol: { span: 6 },
      wrapperCol: { span: 14 },
      labelCol1: { span: 14 },
      wrapperCol1: { span: 10 },
      url: {
        list: "/132"
      }
    }
  },
  created() {
    this.getList()
  },
  methods: {
    loadData() { },
    getList() {
      getAction(this.url.lsit).then(res => {
        this.formDown = res.result
      })
    },
    changeIntermediateFrequency(val) {
      this.formFrequencyHopping.upFrequencSynchronousChannelFrequencyyValue = val
    }
  }
}
</script>

<style lang='less' scoped>
#contentBox {
  width: 100%;
  display: flex;
  flex-wrap: wrap;

  .statusDisplayBox {
    width: 100%;
  }

  .leftBox {
    width: 40%;
    // height: calc(100vh - 10px);
    // border: 0.1px solid #1a7683;
    border-collapse: collapse;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

    .ant-card {
      border-collapse: collapse;
    }

    .upBox {
      width: 100%;
      // margin-bottom: 3px;
    }

    .downBox {
      width: 100%;
      // margin-bottom: 3px;
    }

    .publicConfigurationBox {
      width: 100%;
      // margin-bottom: 3px;
    }
  }

  .frequencyHoppingBox {
    .ant-card {
      //  height: calc(100vh - 200px);
    }

    // border: 1px solid;
    width: 60%;
    // margin-right: 3px;
  }
}
</style>